package com.grass.p019lv.view.svip;

import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.Constance;
import com.androidx.p013lv.base.bean.InventionBean;
import com.androidx.p013lv.base.bean.VideoBean;
import com.androidx.p013lv.base.interfaces.Key;
import com.androidx.p013lv.base.listener.ItemClickListener;
import com.androidx.p013lv.invention.OnInventionType;
import com.androidx.p013lv.invention.adapter.HorizonealAdapter;
import com.androidx.p013lv.invention.view.BaseView;

/* renamed from: com.grass.lv.view.svip.SvipThreeView */
public class SvipThreeView extends BaseView {
    HorizonealAdapter adapter;
    LinearLayout btn_more;
    private boolean clickLimit = true;
    private long lastClickTime;
    RecyclerView recycler;
    TextView tv_title;

    public SvipThreeView(View view, Fragment fragment, String str, OnInventionType onInventionType) {
        super(view, fragment, str, onInventionType);
        this.tv_title = (TextView) view.findViewById(R.id.tv_title);
        this.recycler = (RecyclerView) view.findViewById(R.id.recycler);
        this.btn_more = (LinearLayout) view.findViewById(R.id.btn_more);
    }

    @Override // com.androidx.p013lv.invention.view.BaseView
    public void setView(InventionBean inventionBean, int i) {
        super.setView(inventionBean, i);
        this.tv_title.setText(this.inventionBean.getStationName());
        this.btn_more.setOnClickListener(new View.OnClickListener() {
            /* class com.grass.p019lv.view.svip.SvipThreeView.View$OnClickListenerC32381 */

            public void onClick(View view) {
                if (!SvipThreeView.this.isOnClick()) {
                    SvipThreeView.this.onInventionType.onClick(SvipThreeView.this.inventionBean, SvipThreeView.this.position, view.getId());
                }
            }
        });
        setRecycler();
    }

    /* access modifiers changed from: package-private */
    public void setRecycler() {
        this.recycler.setLayoutManager(new LinearLayoutManager(this.context, 0, false));
        HorizonealAdapter horizonealAdapter = new HorizonealAdapter(this.fragment, this.inventionBean.getVideoList(), this.domain);
        this.adapter = horizonealAdapter;
        this.recycler.setAdapter(horizonealAdapter);
        this.adapter.setItemListener(new ItemClickListener() {
            /* class com.grass.p019lv.view.svip.SvipThreeView.C32392 */

            @Override // com.androidx.p013lv.base.listener.ItemClickListener
            public void onItemClick(View view, int i) {
                if (!SvipThreeView.this.isOnClick()) {
                    ARouter.getInstance().build(Constance.VIDEO_PLAY_ACTIVITY).withSerializable(Key.VIDEO_ID, Integer.valueOf(((VideoBean) SvipThreeView.this.adapter.getDataInPosition(i)).getVideoId())).navigation();
                }
            }
        });
    }

    /* access modifiers changed from: protected */
    public boolean isOnClick() {
        long currentTimeMillis = System.currentTimeMillis();
        long j = currentTimeMillis - this.lastClickTime;
        if (j > 1000) {
            this.lastClickTime = currentTimeMillis;
        }
        return !this.clickLimit ? j < 0 : j <= 1000;
    }
}
